package cn.com.bdqn.dao;

import cn.com.bdqn.entity.SysRole;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface SysRoleDao {

    public List<SysRole> queryByLike(SysRole sysRole);

    @Select("select * from sys_role")
    public List<SysRole> queryAll();

    @Select("select * from sys_role where role_id = #{value}")
    public SysRole queryByRoleId(Long roleId);

    public int updateSysRole(SysRole sysRole);

    @Insert("insert into sys_role values\n" +
            "(default,#{roleName},#{roleDesc},0)")
    public int addSysRole(SysRole sysRole);

    @Delete("delete from sys_role where role_id = #{value}")
    public int delSysRole(Long roleId);
}
